<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - id:000977,sync:fuzzer2,src:001052.lcov_info_final - test/gmock-1.7.0/src/gmock-matchers.cc</title>
  <link rel="stylesheet" type="text/css" href="../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">test/gmock-1.7.0/src</a> - gmock-matchers.cc<span style="font-size: 80%;"> (source / <a href="gmock-matchers.cc.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">id:000977,sync:fuzzer2,src:001052.lcov_info_final</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">174</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2016-03-13 10:42:47</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">19</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : // Copyright 2007, Google Inc.</a>
<span class="lineNum">       2 </span>            : // All rights reserved.
<span class="lineNum">       3 </span>            : //
<span class="lineNum">       4 </span>            : // Redistribution and use in source and binary forms, with or without
<span class="lineNum">       5 </span>            : // modification, are permitted provided that the following conditions are
<span class="lineNum">       6 </span>            : // met:
<span class="lineNum">       7 </span>            : //
<span class="lineNum">       8 </span>            : //     * Redistributions of source code must retain the above copyright
<span class="lineNum">       9 </span>            : // notice, this list of conditions and the following disclaimer.
<span class="lineNum">      10 </span>            : //     * Redistributions in binary form must reproduce the above
<span class="lineNum">      11 </span>            : // copyright notice, this list of conditions and the following disclaimer
<span class="lineNum">      12 </span>            : // in the documentation and/or other materials provided with the
<span class="lineNum">      13 </span>            : // distribution.
<span class="lineNum">      14 </span>            : //     * Neither the name of Google Inc. nor the names of its
<span class="lineNum">      15 </span>            : // contributors may be used to endorse or promote products derived from
<span class="lineNum">      16 </span>            : // this software without specific prior written permission.
<span class="lineNum">      17 </span>            : //
<span class="lineNum">      18 </span>            : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
<span class="lineNum">      19 </span>            : // &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
<span class="lineNum">      20 </span>            : // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
<span class="lineNum">      21 </span>            : // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
<span class="lineNum">      22 </span>            : // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
<span class="lineNum">      23 </span>            : // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
<span class="lineNum">      24 </span>            : // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
<span class="lineNum">      25 </span>            : // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
<span class="lineNum">      26 </span>            : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
<span class="lineNum">      27 </span>            : // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<span class="lineNum">      28 </span>            : // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<span class="lineNum">      29 </span>            : //
<span class="lineNum">      30 </span>            : // Author: wan@google.com (Zhanyong Wan)
<span class="lineNum">      31 </span>            : 
<span class="lineNum">      32 </span>            : // Google Mock - a framework for writing C++ mock classes.
<span class="lineNum">      33 </span>            : //
<span class="lineNum">      34 </span>            : // This file implements Matcher&lt;const string&amp;&gt;, Matcher&lt;string&gt;, and
<span class="lineNum">      35 </span>            : // utilities for defining matchers.
<span class="lineNum">      36 </span>            : 
<span class="lineNum">      37 </span>            : #include &quot;gmock/gmock-matchers.h&quot;
<span class="lineNum">      38 </span>            : #include &quot;gmock/gmock-generated-matchers.h&quot;
<span class="lineNum">      39 </span>            : 
<span class="lineNum">      40 </span>            : #include &lt;string.h&gt;
<span class="lineNum">      41 </span>            : #include &lt;sstream&gt;
<span class="lineNum">      42 </span>            : #include &lt;string&gt;
<span class="lineNum">      43 </span>            : 
<span class="lineNum">      44 </span>            : namespace testing {
<span class="lineNum">      45 </span>            : 
<a name="46"><span class="lineNum">      46 </span>            : // Constructs a matcher that matches a const string&amp; whose value is</a>
<span class="lineNum">      47 </span>            : // equal to s.
<span class="lineNum">      48 </span><span class="lineNoCov">          0 : Matcher&lt;const internal::string&amp;&gt;::Matcher(const internal::string&amp; s) {</span>
<span class="lineNum">      49 </span><span class="lineNoCov">          0 :   *this = Eq(s);</span>
<span class="lineNum">      50 </span><span class="lineNoCov">          0 : }</span>
<span class="lineNum">      51 </span>            : 
<a name="52"><span class="lineNum">      52 </span>            : // Constructs a matcher that matches a const string&amp; whose value is</a>
<span class="lineNum">      53 </span>            : // equal to s.
<span class="lineNum">      54 </span><span class="lineNoCov">          0 : Matcher&lt;const internal::string&amp;&gt;::Matcher(const char* s) {</span>
<span class="lineNum">      55 </span><span class="lineNoCov">          0 :   *this = Eq(internal::string(s));</span>
<span class="lineNum">      56 </span><span class="lineNoCov">          0 : }</span>
<a name="57"><span class="lineNum">      57 </span>            : </a>
<span class="lineNum">      58 </span>            : // Constructs a matcher that matches a string whose value is equal to s.
<span class="lineNum">      59 </span><span class="lineNoCov">          0 : Matcher&lt;internal::string&gt;::Matcher(const internal::string&amp; s) { *this = Eq(s); }</span>
<a name="60"><span class="lineNum">      60 </span>            : </a>
<span class="lineNum">      61 </span>            : // Constructs a matcher that matches a string whose value is equal to s.
<span class="lineNum">      62 </span><span class="lineNoCov">          0 : Matcher&lt;internal::string&gt;::Matcher(const char* s) {</span>
<span class="lineNum">      63 </span><span class="lineNoCov">          0 :   *this = Eq(internal::string(s));</span>
<span class="lineNum">      64 </span><span class="lineNoCov">          0 : }</span>
<span class="lineNum">      65 </span>            : 
<span class="lineNum">      66 </span>            : #if GTEST_HAS_STRING_PIECE_
<span class="lineNum">      67 </span>            : // Constructs a matcher that matches a const StringPiece&amp; whose value is
<span class="lineNum">      68 </span>            : // equal to s.
<span class="lineNum">      69 </span>            : Matcher&lt;const StringPiece&amp;&gt;::Matcher(const internal::string&amp; s) {
<span class="lineNum">      70 </span>            :   *this = Eq(s);
<span class="lineNum">      71 </span>            : }
<span class="lineNum">      72 </span>            : 
<span class="lineNum">      73 </span>            : // Constructs a matcher that matches a const StringPiece&amp; whose value is
<span class="lineNum">      74 </span>            : // equal to s.
<span class="lineNum">      75 </span>            : Matcher&lt;const StringPiece&amp;&gt;::Matcher(const char* s) {
<span class="lineNum">      76 </span>            :   *this = Eq(internal::string(s));
<span class="lineNum">      77 </span>            : }
<span class="lineNum">      78 </span>            : 
<span class="lineNum">      79 </span>            : // Constructs a matcher that matches a const StringPiece&amp; whose value is
<span class="lineNum">      80 </span>            : // equal to s.
<span class="lineNum">      81 </span>            : Matcher&lt;const StringPiece&amp;&gt;::Matcher(StringPiece s) {
<span class="lineNum">      82 </span>            :   *this = Eq(s.ToString());
<span class="lineNum">      83 </span>            : }
<span class="lineNum">      84 </span>            : 
<span class="lineNum">      85 </span>            : // Constructs a matcher that matches a StringPiece whose value is equal to s.
<span class="lineNum">      86 </span>            : Matcher&lt;StringPiece&gt;::Matcher(const internal::string&amp; s) {
<span class="lineNum">      87 </span>            :   *this = Eq(s);
<span class="lineNum">      88 </span>            : }
<span class="lineNum">      89 </span>            : 
<span class="lineNum">      90 </span>            : // Constructs a matcher that matches a StringPiece whose value is equal to s.
<span class="lineNum">      91 </span>            : Matcher&lt;StringPiece&gt;::Matcher(const char* s) {
<span class="lineNum">      92 </span>            :   *this = Eq(internal::string(s));
<span class="lineNum">      93 </span>            : }
<span class="lineNum">      94 </span>            : 
<span class="lineNum">      95 </span>            : // Constructs a matcher that matches a StringPiece whose value is equal to s.
<span class="lineNum">      96 </span>            : Matcher&lt;StringPiece&gt;::Matcher(StringPiece s) {
<span class="lineNum">      97 </span>            :   *this = Eq(s.ToString());
<span class="lineNum">      98 </span>            : }
<span class="lineNum">      99 </span>            : #endif  // GTEST_HAS_STRING_PIECE_
<span class="lineNum">     100 </span>            : 
<span class="lineNum">     101 </span>            : namespace internal {
<span class="lineNum">     102 </span>            : 
<a name="103"><span class="lineNum">     103 </span>            : // Joins a vector of strings as if they are fields of a tuple; returns</a>
<span class="lineNum">     104 </span>            : // the joined string.
<span class="lineNum">     105 </span><span class="lineNoCov">          0 : GTEST_API_ string JoinAsTuple(const Strings&amp; fields) {</span>
<span class="lineNum">     106 </span><span class="lineNoCov">          0 :   switch (fields.size()) {</span>
<span class="lineNum">     107 </span>            :     case 0:
<span class="lineNum">     108 </span><span class="lineNoCov">          0 :       return &quot;&quot;;</span>
<span class="lineNum">     109 </span>            :     case 1:
<span class="lineNum">     110 </span><span class="lineNoCov">          0 :       return fields[0];</span>
<span class="lineNum">     111 </span>            :     default:
<span class="lineNum">     112 </span><span class="lineNoCov">          0 :       string result = &quot;(&quot; + fields[0];</span>
<span class="lineNum">     113 </span><span class="lineNoCov">          0 :       for (size_t i = 1; i &lt; fields.size(); i++) {</span>
<span class="lineNum">     114 </span><span class="lineNoCov">          0 :         result += &quot;, &quot;;</span>
<span class="lineNum">     115 </span><span class="lineNoCov">          0 :         result += fields[i];</span>
<span class="lineNum">     116 </span>            :       }
<span class="lineNum">     117 </span><span class="lineNoCov">          0 :       result += &quot;)&quot;;</span>
<span class="lineNum">     118 </span><span class="lineNoCov">          0 :       return result;</span>
<span class="lineNum">     119 </span>            :   }
<span class="lineNum">     120 </span>            : }
<span class="lineNum">     121 </span>            : 
<span class="lineNum">     122 </span>            : // Returns the description for a matcher defined using the MATCHER*()
<span class="lineNum">     123 </span>            : // macro where the user-supplied description string is &quot;&quot;, if
<span class="lineNum">     124 </span>            : // 'negation' is false; otherwise returns the description of the
<a name="125"><span class="lineNum">     125 </span>            : // negation of the matcher.  'param_values' contains a list of strings</a>
<span class="lineNum">     126 </span>            : // that are the print-out of the matcher's parameters.
<span class="lineNum">     127 </span><span class="lineNoCov">          0 : GTEST_API_ string FormatMatcherDescription(bool negation,</span>
<span class="lineNum">     128 </span>            :                                            const char* matcher_name,
<span class="lineNum">     129 </span>            :                                            const Strings&amp; param_values) {
<span class="lineNum">     130 </span><span class="lineNoCov">          0 :   string result = ConvertIdentifierNameToWords(matcher_name);</span>
<span class="lineNum">     131 </span><span class="lineNoCov">          0 :   if (param_values.size() &gt;= 1)</span>
<span class="lineNum">     132 </span><span class="lineNoCov">          0 :     result += &quot; &quot; + JoinAsTuple(param_values);</span>
<span class="lineNum">     133 </span><span class="lineNoCov">          0 :   return negation ? &quot;not (&quot; + result + &quot;)&quot; : result;</span>
<span class="lineNum">     134 </span>            : }
<span class="lineNum">     135 </span>            : 
<span class="lineNum">     136 </span>            : // FindMaxBipartiteMatching and its helper class.
<span class="lineNum">     137 </span>            : //
<span class="lineNum">     138 </span>            : // Uses the well-known Ford-Fulkerson max flow method to find a maximum
<span class="lineNum">     139 </span>            : // bipartite matching. Flow is considered to be from left to right.
<span class="lineNum">     140 </span>            : // There is an implicit source node that is connected to all of the left
<span class="lineNum">     141 </span>            : // nodes, and an implicit sink node that is connected to all of the
<span class="lineNum">     142 </span>            : // right nodes. All edges have unit capacity.
<span class="lineNum">     143 </span>            : //
<span class="lineNum">     144 </span>            : // Neither the flow graph nor the residual flow graph are represented
<span class="lineNum">     145 </span>            : // explicitly. Instead, they are implied by the information in 'graph' and
<span class="lineNum">     146 </span>            : // a vector&lt;int&gt; called 'left_' whose elements are initialized to the
<span class="lineNum">     147 </span>            : // value kUnused. This represents the initial state of the algorithm,
<span class="lineNum">     148 </span>            : // where the flow graph is empty, and the residual flow graph has the
<span class="lineNum">     149 </span>            : // following edges:
<span class="lineNum">     150 </span>            : //   - An edge from source to each left_ node
<span class="lineNum">     151 </span>            : //   - An edge from each right_ node to sink
<span class="lineNum">     152 </span>            : //   - An edge from each left_ node to each right_ node, if the
<span class="lineNum">     153 </span>            : //     corresponding edge exists in 'graph'.
<span class="lineNum">     154 </span>            : //
<span class="lineNum">     155 </span>            : // When the TryAugment() method adds a flow, it sets left_[l] = r for some
<span class="lineNum">     156 </span>            : // nodes l and r. This induces the following changes:
<span class="lineNum">     157 </span>            : //   - The edges (source, l), (l, r), and (r, sink) are added to the
<span class="lineNum">     158 </span>            : //     flow graph.
<span class="lineNum">     159 </span>            : //   - The same three edges are removed from the residual flow graph.
<span class="lineNum">     160 </span>            : //   - The reverse edges (l, source), (r, l), and (sink, r) are added
<span class="lineNum">     161 </span>            : //     to the residual flow graph, which is a directional graph
<span class="lineNum">     162 </span>            : //     representing unused flow capacity.
<span class="lineNum">     163 </span>            : //
<span class="lineNum">     164 </span>            : // When the method augments a flow (moving left_[l] from some r1 to some
<span class="lineNum">     165 </span>            : // other r2), this can be thought of as &quot;undoing&quot; the above steps with
<span class="lineNum">     166 </span>            : // respect to r1 and &quot;redoing&quot; them with respect to r2.
<span class="lineNum">     167 </span>            : //
<span class="lineNum">     168 </span>            : // It bears repeating that the flow graph and residual flow graph are
<span class="lineNum">     169 </span>            : // never represented explicitly, but can be derived by looking at the
<span class="lineNum">     170 </span>            : // information in 'graph' and in left_.
<span class="lineNum">     171 </span>            : //
<span class="lineNum">     172 </span>            : // As an optimization, there is a second vector&lt;int&gt; called right_ which
<span class="lineNum">     173 </span>            : // does not provide any new information. Instead, it enables more
<span class="lineNum">     174 </span>            : // efficient queries about edges entering or leaving the right-side nodes
<span class="lineNum">     175 </span>            : // of the flow or residual flow graphs. The following invariants are
<span class="lineNum">     176 </span>            : // maintained:
<span class="lineNum">     177 </span>            : //
<span class="lineNum">     178 </span>            : // left[l] == kUnused or right[left[l]] == l
<span class="lineNum">     179 </span>            : // right[r] == kUnused or left[right[r]] == r
<span class="lineNum">     180 </span>            : //
<span class="lineNum">     181 </span>            : // . [ source ]                                        .
<span class="lineNum">     182 </span>            : // .   |||                                             .
<span class="lineNum">     183 </span>            : // .   |||                                             .
<span class="lineNum">     184 </span>            : // .   ||\--&gt; left[0]=1  ---\    right[0]=-1 ----\     .
<span class="lineNum">     185 </span>            : // .   ||                   |                    |     .
<span class="lineNum">     186 </span>            : // .   |\---&gt; left[1]=-1    \--&gt; right[1]=0  ---\|     .
<span class="lineNum">     187 </span>            : // .   |                                        ||     .
<span class="lineNum">     188 </span>            : // .   \----&gt; left[2]=2  ------&gt; right[2]=2  --\||     .
<span class="lineNum">     189 </span>            : // .                                           |||     .
<span class="lineNum">     190 </span>            : // .         elements           matchers       vvv     .
<span class="lineNum">     191 </span>            : // .                                         [ sink ]  .
<span class="lineNum">     192 </span>            : //
<span class="lineNum">     193 </span>            : // See Also:
<span class="lineNum">     194 </span>            : //   [1] Cormen, et al (2001). &quot;Section 26.2: The Ford–Fulkerson method&quot;.
<span class="lineNum">     195 </span>            : //       &quot;Introduction to Algorithms (Second ed.)&quot;, pp. 651–664.
<a name="196"><span class="lineNum">     196 </span>            : //   [2] &quot;Ford–Fulkerson algorithm&quot;, Wikipedia,</a>
<span class="lineNum">     197 </span>            : //       'http://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm'
<a name="198"><span class="lineNum">     198 </span><span class="lineNoCov">          0 : class MaxBipartiteMatchState {</span></a>
<span class="lineNum">     199 </span>            :  public:
<span class="lineNum">     200 </span><span class="lineNoCov">          0 :   explicit MaxBipartiteMatchState(const MatchMatrix&amp; graph)</span>
<span class="lineNum">     201 </span>            :       : graph_(&amp;graph),
<span class="lineNum">     202 </span><span class="lineNoCov">          0 :         left_(graph_-&gt;LhsSize(), kUnused),</span>
<span class="lineNum">     203 </span><span class="lineNoCov">          0 :         right_(graph_-&gt;RhsSize(), kUnused) {</span>
<span class="lineNum">     204 </span><span class="lineNoCov">          0 :   }</span>
<a name="205"><span class="lineNum">     205 </span>            : </a>
<span class="lineNum">     206 </span>            :   // Returns the edges of a maximal match, each in the form {left, right}.
<span class="lineNum">     207 </span><span class="lineNoCov">          0 :   ElementMatcherPairs Compute() {</span>
<span class="lineNum">     208 </span>            :     // 'seen' is used for path finding { 0: unseen, 1: seen }.
<span class="lineNum">     209 </span><span class="lineNoCov">          0 :     ::std::vector&lt;char&gt; seen;</span>
<span class="lineNum">     210 </span>            :     // Searches the residual flow graph for a path from each left node to
<span class="lineNum">     211 </span>            :     // the sink in the residual flow graph, and if one is found, add flow
<span class="lineNum">     212 </span>            :     // to the graph. It's okay to search through the left nodes once. The
<span class="lineNum">     213 </span>            :     // edge from the implicit source node to each previously-visited left
<span class="lineNum">     214 </span>            :     // node will have flow if that left node has any path to the sink
<span class="lineNum">     215 </span>            :     // whatsoever. Subsequent augmentations can only add flow to the
<span class="lineNum">     216 </span>            :     // network, and cannot take away that previous flow unit from the source.
<span class="lineNum">     217 </span>            :     // Since the source-to-left edge can only carry one flow unit (or,
<span class="lineNum">     218 </span>            :     // each element can be matched to only one matcher), there is no need
<span class="lineNum">     219 </span>            :     // to visit the left nodes more than once looking for augmented paths.
<span class="lineNum">     220 </span>            :     // The flow is known to be possible or impossible by looking at the
<span class="lineNum">     221 </span>            :     // node once.
<span class="lineNum">     222 </span><span class="lineNoCov">          0 :     for (size_t ilhs = 0; ilhs &lt; graph_-&gt;LhsSize(); ++ilhs) {</span>
<span class="lineNum">     223 </span>            :       // Reset the path-marking vector and try to find a path from
<span class="lineNum">     224 </span>            :       // source to sink starting at the left_[ilhs] node.
<span class="lineNum">     225 </span><span class="lineNoCov">          0 :       GTEST_CHECK_(left_[ilhs] == kUnused)</span>
<span class="lineNum">     226 </span><span class="lineNoCov">          0 :           &lt;&lt; &quot;ilhs: &quot; &lt;&lt; ilhs &lt;&lt; &quot;, left_[ilhs]: &quot; &lt;&lt; left_[ilhs];</span>
<span class="lineNum">     227 </span>            :       // 'seen' initialized to 'graph_-&gt;RhsSize()' copies of 0.
<span class="lineNum">     228 </span><span class="lineNoCov">          0 :       seen.assign(graph_-&gt;RhsSize(), 0);</span>
<span class="lineNum">     229 </span><span class="lineNoCov">          0 :       TryAugment(ilhs, &amp;seen);</span>
<span class="lineNum">     230 </span>            :     }
<span class="lineNum">     231 </span><span class="lineNoCov">          0 :     ElementMatcherPairs result;</span>
<span class="lineNum">     232 </span><span class="lineNoCov">          0 :     for (size_t ilhs = 0; ilhs &lt; left_.size(); ++ilhs) {</span>
<span class="lineNum">     233 </span><span class="lineNoCov">          0 :       size_t irhs = left_[ilhs];</span>
<span class="lineNum">     234 </span><span class="lineNoCov">          0 :       if (irhs == kUnused) continue;</span>
<span class="lineNum">     235 </span><span class="lineNoCov">          0 :       result.push_back(ElementMatcherPair(ilhs, irhs));</span>
<span class="lineNum">     236 </span>            :     }
<span class="lineNum">     237 </span><span class="lineNoCov">          0 :     return result;</span>
<span class="lineNum">     238 </span>            :   }
<span class="lineNum">     239 </span>            : 
<span class="lineNum">     240 </span>            :  private:
<span class="lineNum">     241 </span>            :   static const size_t kUnused = static_cast&lt;size_t&gt;(-1);
<span class="lineNum">     242 </span>            : 
<span class="lineNum">     243 </span>            :   // Perform a depth-first search from left node ilhs to the sink.  If a
<span class="lineNum">     244 </span>            :   // path is found, flow is added to the network by linking the left and
<span class="lineNum">     245 </span>            :   // right vector elements corresponding each segment of the path.
<span class="lineNum">     246 </span>            :   // Returns true if a path to sink was found, which means that a unit of
<span class="lineNum">     247 </span>            :   // flow was added to the network. The 'seen' vector elements correspond
<span class="lineNum">     248 </span>            :   // to right nodes and are marked to eliminate cycles from the search.
<span class="lineNum">     249 </span>            :   //
<span class="lineNum">     250 </span>            :   // Left nodes will only be explored at most once because they
<span class="lineNum">     251 </span>            :   // are accessible from at most one right node in the residual flow
<span class="lineNum">     252 </span>            :   // graph.
<span class="lineNum">     253 </span>            :   //
<span class="lineNum">     254 </span>            :   // Note that left_[ilhs] is the only element of left_ that TryAugment will
<span class="lineNum">     255 </span>            :   // potentially transition from kUnused to another value. Any other
<span class="lineNum">     256 </span>            :   // left_ element holding kUnused before TryAugment will be holding it
<a name="257"><span class="lineNum">     257 </span>            :   // when TryAugment returns.</a>
<span class="lineNum">     258 </span>            :   //
<span class="lineNum">     259 </span><span class="lineNoCov">          0 :   bool TryAugment(size_t ilhs, ::std::vector&lt;char&gt;* seen) {</span>
<span class="lineNum">     260 </span><span class="lineNoCov">          0 :     for (size_t irhs = 0; irhs &lt; graph_-&gt;RhsSize(); ++irhs) {</span>
<span class="lineNum">     261 </span><span class="lineNoCov">          0 :       if ((*seen)[irhs])</span>
<span class="lineNum">     262 </span><span class="lineNoCov">          0 :         continue;</span>
<span class="lineNum">     263 </span><span class="lineNoCov">          0 :       if (!graph_-&gt;HasEdge(ilhs, irhs))</span>
<span class="lineNum">     264 </span><span class="lineNoCov">          0 :         continue;</span>
<span class="lineNum">     265 </span>            :       // There's an available edge from ilhs to irhs.
<span class="lineNum">     266 </span><span class="lineNoCov">          0 :       (*seen)[irhs] = 1;</span>
<span class="lineNum">     267 </span>            :       // Next a search is performed to determine whether
<span class="lineNum">     268 </span>            :       // this edge is a dead end or leads to the sink.
<span class="lineNum">     269 </span>            :       //
<span class="lineNum">     270 </span>            :       // right_[irhs] == kUnused means that there is residual flow from
<span class="lineNum">     271 </span>            :       // right node irhs to the sink, so we can use that to finish this
<span class="lineNum">     272 </span>            :       // flow path and return success.
<span class="lineNum">     273 </span>            :       //
<span class="lineNum">     274 </span>            :       // Otherwise there is residual flow to some ilhs. We push flow
<span class="lineNum">     275 </span>            :       // along that path and call ourselves recursively to see if this
<span class="lineNum">     276 </span>            :       // ultimately leads to sink.
<span class="lineNum">     277 </span><span class="lineNoCov">          0 :       if (right_[irhs] == kUnused || TryAugment(right_[irhs], seen)) {</span>
<span class="lineNum">     278 </span>            :         // Add flow from left_[ilhs] to right_[irhs].
<span class="lineNum">     279 </span><span class="lineNoCov">          0 :         left_[ilhs] = irhs;</span>
<span class="lineNum">     280 </span><span class="lineNoCov">          0 :         right_[irhs] = ilhs;</span>
<span class="lineNum">     281 </span><span class="lineNoCov">          0 :         return true;</span>
<span class="lineNum">     282 </span>            :       }
<span class="lineNum">     283 </span>            :     }
<span class="lineNum">     284 </span><span class="lineNoCov">          0 :     return false;</span>
<span class="lineNum">     285 </span>            :   }
<span class="lineNum">     286 </span>            : 
<span class="lineNum">     287 </span>            :   const MatchMatrix* graph_;  // not owned
<span class="lineNum">     288 </span>            :   // Each element of the left_ vector represents a left hand side node
<span class="lineNum">     289 </span>            :   // (i.e. an element) and each element of right_ is a right hand side
<span class="lineNum">     290 </span>            :   // node (i.e. a matcher). The values in the left_ vector indicate
<span class="lineNum">     291 </span>            :   // outflow from that node to a node on the the right_ side. The values
<span class="lineNum">     292 </span>            :   // in the right_ indicate inflow, and specify which left_ node is
<span class="lineNum">     293 </span>            :   // feeding that right_ node, if any. For example, left_[3] == 1 means
<span class="lineNum">     294 </span>            :   // there's a flow from element #3 to matcher #1. Such a flow would also
<span class="lineNum">     295 </span>            :   // be redundantly represented in the right_ vector as right_[1] == 3.
<span class="lineNum">     296 </span>            :   // Elements of left_ and right_ are either kUnused or mutually
<span class="lineNum">     297 </span>            :   // referent. Mutually referent means that left_[right_[i]] = i and
<span class="lineNum">     298 </span>            :   // right_[left_[i]] = i.
<span class="lineNum">     299 </span>            :   ::std::vector&lt;size_t&gt; left_;
<span class="lineNum">     300 </span>            :   ::std::vector&lt;size_t&gt; right_;
<span class="lineNum">     301 </span>            : 
<span class="lineNum">     302 </span>            :   GTEST_DISALLOW_ASSIGN_(MaxBipartiteMatchState);
<span class="lineNum">     303 </span>            : };
<span class="lineNum">     304 </span>            : 
<span class="lineNum">     305 </span>            : const size_t MaxBipartiteMatchState::kUnused;
<a name="306"><span class="lineNum">     306 </span>            : </a>
<span class="lineNum">     307 </span>            : GTEST_API_ ElementMatcherPairs
<span class="lineNum">     308 </span><span class="lineNoCov">          0 : FindMaxBipartiteMatching(const MatchMatrix&amp; g) {</span>
<span class="lineNum">     309 </span><span class="lineNoCov">          0 :   return MaxBipartiteMatchState(g).Compute();</span>
<a name="310"><span class="lineNum">     310 </span>            : }</a>
<span class="lineNum">     311 </span>            : 
<span class="lineNum">     312 </span><span class="lineNoCov">          0 : static void LogElementMatcherPairVec(const ElementMatcherPairs&amp; pairs,</span>
<span class="lineNum">     313 </span>            :                                      ::std::ostream* stream) {
<span class="lineNum">     314 </span>            :   typedef ElementMatcherPairs::const_iterator Iter;
<span class="lineNum">     315 </span><span class="lineNoCov">          0 :   ::std::ostream&amp; os = *stream;</span>
<span class="lineNum">     316 </span><span class="lineNoCov">          0 :   os &lt;&lt; &quot;{&quot;;</span>
<span class="lineNum">     317 </span><span class="lineNoCov">          0 :   const char *sep = &quot;&quot;;</span>
<span class="lineNum">     318 </span><span class="lineNoCov">          0 :   for (Iter it = pairs.begin(); it != pairs.end(); ++it) {</span>
<span class="lineNum">     319 </span><span class="lineNoCov">          0 :     os &lt;&lt; sep &lt;&lt; &quot;\n  (&quot;</span>
<span class="lineNum">     320 </span><span class="lineNoCov">          0 :        &lt;&lt; &quot;element #&quot; &lt;&lt; it-&gt;first &lt;&lt; &quot;, &quot;</span>
<span class="lineNum">     321 </span><span class="lineNoCov">          0 :        &lt;&lt; &quot;matcher #&quot; &lt;&lt; it-&gt;second &lt;&lt; &quot;)&quot;;</span>
<span class="lineNum">     322 </span><span class="lineNoCov">          0 :     sep = &quot;,&quot;;</span>
<span class="lineNum">     323 </span>            :   }
<span class="lineNum">     324 </span><span class="lineNoCov">          0 :   os &lt;&lt; &quot;\n}&quot;;</span>
<span class="lineNum">     325 </span><span class="lineNoCov">          0 : }</span>
<a name="326"><span class="lineNum">     326 </span>            : </a>
<span class="lineNum">     327 </span>            : // Tries to find a pairing, and explains the result.
<span class="lineNum">     328 </span><span class="lineNoCov">          0 : GTEST_API_ bool FindPairing(const MatchMatrix&amp; matrix,</span>
<span class="lineNum">     329 </span>            :                             MatchResultListener* listener) {
<span class="lineNum">     330 </span><span class="lineNoCov">          0 :   ElementMatcherPairs matches = FindMaxBipartiteMatching(matrix);</span>
<span class="lineNum">     331 </span>            : 
<span class="lineNum">     332 </span><span class="lineNoCov">          0 :   size_t max_flow = matches.size();</span>
<span class="lineNum">     333 </span><span class="lineNoCov">          0 :   bool result = (max_flow == matrix.RhsSize());</span>
<span class="lineNum">     334 </span>            : 
<span class="lineNum">     335 </span><span class="lineNoCov">          0 :   if (!result) {</span>
<span class="lineNum">     336 </span><span class="lineNoCov">          0 :     if (listener-&gt;IsInterested()) {</span>
<span class="lineNum">     337 </span>            :       *listener &lt;&lt; &quot;where no permutation of the elements can &quot;
<span class="lineNum">     338 </span><span class="lineNoCov">          0 :                    &quot;satisfy all matchers, and the closest match is &quot;</span>
<span class="lineNum">     339 </span><span class="lineNoCov">          0 :                 &lt;&lt; max_flow &lt;&lt; &quot; of &quot; &lt;&lt; matrix.RhsSize()</span>
<span class="lineNum">     340 </span><span class="lineNoCov">          0 :                 &lt;&lt; &quot; matchers with the pairings:\n&quot;;</span>
<span class="lineNum">     341 </span><span class="lineNoCov">          0 :       LogElementMatcherPairVec(matches, listener-&gt;stream());</span>
<span class="lineNum">     342 </span>            :     }
<span class="lineNum">     343 </span><span class="lineNoCov">          0 :     return false;</span>
<span class="lineNum">     344 </span>            :   }
<span class="lineNum">     345 </span>            : 
<span class="lineNum">     346 </span><span class="lineNoCov">          0 :   if (matches.size() &gt; 1) {</span>
<span class="lineNum">     347 </span><span class="lineNoCov">          0 :     if (listener-&gt;IsInterested()) {</span>
<span class="lineNum">     348 </span><span class="lineNoCov">          0 :       const char *sep = &quot;where:\n&quot;;</span>
<span class="lineNum">     349 </span><span class="lineNoCov">          0 :       for (size_t mi = 0; mi &lt; matches.size(); ++mi) {</span>
<span class="lineNum">     350 </span><span class="lineNoCov">          0 :         *listener &lt;&lt; sep &lt;&lt; &quot; - element #&quot; &lt;&lt; matches[mi].first</span>
<span class="lineNum">     351 </span><span class="lineNoCov">          0 :                   &lt;&lt; &quot; is matched by matcher #&quot; &lt;&lt; matches[mi].second;</span>
<span class="lineNum">     352 </span><span class="lineNoCov">          0 :         sep = &quot;,\n&quot;;</span>
<span class="lineNum">     353 </span>            :       }
<span class="lineNum">     354 </span>            :     }
<span class="lineNum">     355 </span>            :   }
<span class="lineNum">     356 </span><span class="lineNoCov">          0 :   return true;</span>
<a name="357"><span class="lineNum">     357 </span>            : }</a>
<span class="lineNum">     358 </span>            : 
<span class="lineNum">     359 </span><span class="lineNoCov">          0 : bool MatchMatrix::NextGraph() {</span>
<span class="lineNum">     360 </span><span class="lineNoCov">          0 :   for (size_t ilhs = 0; ilhs &lt; LhsSize(); ++ilhs) {</span>
<span class="lineNum">     361 </span><span class="lineNoCov">          0 :     for (size_t irhs = 0; irhs &lt; RhsSize(); ++irhs) {</span>
<span class="lineNum">     362 </span><span class="lineNoCov">          0 :       char&amp; b = matched_[SpaceIndex(ilhs, irhs)];</span>
<span class="lineNum">     363 </span><span class="lineNoCov">          0 :       if (!b) {</span>
<span class="lineNum">     364 </span><span class="lineNoCov">          0 :         b = 1;</span>
<span class="lineNum">     365 </span><span class="lineNoCov">          0 :         return true;</span>
<span class="lineNum">     366 </span>            :       }
<span class="lineNum">     367 </span><span class="lineNoCov">          0 :       b = 0;</span>
<span class="lineNum">     368 </span>            :     }
<span class="lineNum">     369 </span>            :   }
<span class="lineNum">     370 </span><span class="lineNoCov">          0 :   return false;</span>
<a name="371"><span class="lineNum">     371 </span>            : }</a>
<span class="lineNum">     372 </span>            : 
<span class="lineNum">     373 </span><span class="lineNoCov">          0 : void MatchMatrix::Randomize() {</span>
<span class="lineNum">     374 </span><span class="lineNoCov">          0 :   for (size_t ilhs = 0; ilhs &lt; LhsSize(); ++ilhs) {</span>
<span class="lineNum">     375 </span><span class="lineNoCov">          0 :     for (size_t irhs = 0; irhs &lt; RhsSize(); ++irhs) {</span>
<span class="lineNum">     376 </span><span class="lineNoCov">          0 :       char&amp; b = matched_[SpaceIndex(ilhs, irhs)];</span>
<span class="lineNum">     377 </span><span class="lineNoCov">          0 :       b = static_cast&lt;char&gt;(rand() &amp; 1);  // NOLINT</span>
<span class="lineNum">     378 </span>            :     }
<span class="lineNum">     379 </span>            :   }
<a name="380"><span class="lineNum">     380 </span><span class="lineNoCov">          0 : }</span></a>
<span class="lineNum">     381 </span>            : 
<span class="lineNum">     382 </span><span class="lineNoCov">          0 : string MatchMatrix::DebugString() const {</span>
<span class="lineNum">     383 </span><span class="lineNoCov">          0 :   ::std::stringstream ss;</span>
<span class="lineNum">     384 </span><span class="lineNoCov">          0 :   const char *sep = &quot;&quot;;</span>
<span class="lineNum">     385 </span><span class="lineNoCov">          0 :   for (size_t i = 0; i &lt; LhsSize(); ++i) {</span>
<span class="lineNum">     386 </span><span class="lineNoCov">          0 :     ss &lt;&lt; sep;</span>
<span class="lineNum">     387 </span><span class="lineNoCov">          0 :     for (size_t j = 0; j &lt; RhsSize(); ++j) {</span>
<span class="lineNum">     388 </span><span class="lineNoCov">          0 :       ss &lt;&lt; HasEdge(i, j);</span>
<span class="lineNum">     389 </span>            :     }
<span class="lineNum">     390 </span><span class="lineNoCov">          0 :     sep = &quot;;&quot;;</span>
<span class="lineNum">     391 </span>            :   }
<span class="lineNum">     392 </span><span class="lineNoCov">          0 :   return ss.str();</span>
<a name="393"><span class="lineNum">     393 </span>            : }</a>
<span class="lineNum">     394 </span>            : 
<span class="lineNum">     395 </span><span class="lineNoCov">          0 : void UnorderedElementsAreMatcherImplBase::DescribeToImpl(</span>
<span class="lineNum">     396 </span>            :     ::std::ostream* os) const {
<span class="lineNum">     397 </span><span class="lineNoCov">          0 :   if (matcher_describers_.empty()) {</span>
<span class="lineNum">     398 </span><span class="lineNoCov">          0 :     *os &lt;&lt; &quot;is empty&quot;;</span>
<span class="lineNum">     399 </span><span class="lineNoCov">          0 :     return;</span>
<span class="lineNum">     400 </span>            :   }
<span class="lineNum">     401 </span><span class="lineNoCov">          0 :   if (matcher_describers_.size() == 1) {</span>
<span class="lineNum">     402 </span><span class="lineNoCov">          0 :     *os &lt;&lt; &quot;has &quot; &lt;&lt; Elements(1) &lt;&lt; &quot; and that element &quot;;</span>
<span class="lineNum">     403 </span><span class="lineNoCov">          0 :     matcher_describers_[0]-&gt;DescribeTo(os);</span>
<span class="lineNum">     404 </span><span class="lineNoCov">          0 :     return;</span>
<span class="lineNum">     405 </span>            :   }
<span class="lineNum">     406 </span><span class="lineNoCov">          0 :   *os &lt;&lt; &quot;has &quot; &lt;&lt; Elements(matcher_describers_.size())</span>
<span class="lineNum">     407 </span><span class="lineNoCov">          0 :       &lt;&lt; &quot; and there exists some permutation of elements such that:\n&quot;;</span>
<span class="lineNum">     408 </span><span class="lineNoCov">          0 :   const char* sep = &quot;&quot;;</span>
<span class="lineNum">     409 </span><span class="lineNoCov">          0 :   for (size_t i = 0; i != matcher_describers_.size(); ++i) {</span>
<span class="lineNum">     410 </span><span class="lineNoCov">          0 :     *os &lt;&lt; sep &lt;&lt; &quot; - element #&quot; &lt;&lt; i &lt;&lt; &quot; &quot;;</span>
<span class="lineNum">     411 </span><span class="lineNoCov">          0 :     matcher_describers_[i]-&gt;DescribeTo(os);</span>
<span class="lineNum">     412 </span><span class="lineNoCov">          0 :     sep = &quot;, and\n&quot;;</span>
<span class="lineNum">     413 </span>            :   }
<a name="414"><span class="lineNum">     414 </span>            : }</a>
<span class="lineNum">     415 </span>            : 
<span class="lineNum">     416 </span><span class="lineNoCov">          0 : void UnorderedElementsAreMatcherImplBase::DescribeNegationToImpl(</span>
<span class="lineNum">     417 </span>            :     ::std::ostream* os) const {
<span class="lineNum">     418 </span><span class="lineNoCov">          0 :   if (matcher_describers_.empty()) {</span>
<span class="lineNum">     419 </span><span class="lineNoCov">          0 :     *os &lt;&lt; &quot;isn't empty&quot;;</span>
<span class="lineNum">     420 </span><span class="lineNoCov">          0 :     return;</span>
<span class="lineNum">     421 </span>            :   }
<span class="lineNum">     422 </span><span class="lineNoCov">          0 :   if (matcher_describers_.size() == 1) {</span>
<span class="lineNum">     423 </span><span class="lineNoCov">          0 :     *os &lt;&lt; &quot;doesn't have &quot; &lt;&lt; Elements(1)</span>
<span class="lineNum">     424 </span><span class="lineNoCov">          0 :         &lt;&lt; &quot;, or has &quot; &lt;&lt; Elements(1) &lt;&lt; &quot; that &quot;;</span>
<span class="lineNum">     425 </span><span class="lineNoCov">          0 :     matcher_describers_[0]-&gt;DescribeNegationTo(os);</span>
<span class="lineNum">     426 </span><span class="lineNoCov">          0 :     return;</span>
<span class="lineNum">     427 </span>            :   }
<span class="lineNum">     428 </span><span class="lineNoCov">          0 :   *os &lt;&lt; &quot;doesn't have &quot; &lt;&lt; Elements(matcher_describers_.size())</span>
<span class="lineNum">     429 </span><span class="lineNoCov">          0 :       &lt;&lt; &quot;, or there exists no permutation of elements such that:\n&quot;;</span>
<span class="lineNum">     430 </span><span class="lineNoCov">          0 :   const char* sep = &quot;&quot;;</span>
<span class="lineNum">     431 </span><span class="lineNoCov">          0 :   for (size_t i = 0; i != matcher_describers_.size(); ++i) {</span>
<span class="lineNum">     432 </span><span class="lineNoCov">          0 :     *os &lt;&lt; sep &lt;&lt; &quot; - element #&quot; &lt;&lt; i &lt;&lt; &quot; &quot;;</span>
<span class="lineNum">     433 </span><span class="lineNoCov">          0 :     matcher_describers_[i]-&gt;DescribeTo(os);</span>
<span class="lineNum">     434 </span><span class="lineNoCov">          0 :     sep = &quot;, and\n&quot;;</span>
<span class="lineNum">     435 </span>            :   }
<span class="lineNum">     436 </span>            : }
<span class="lineNum">     437 </span>            : 
<span class="lineNum">     438 </span>            : // Checks that all matchers match at least one element, and that all
<span class="lineNum">     439 </span>            : // elements match at least one matcher. This enables faster matching
<span class="lineNum">     440 </span>            : // and better error reporting.
<a name="441"><span class="lineNum">     441 </span>            : // Returns false, writing an explanation to 'listener', if and only</a>
<span class="lineNum">     442 </span>            : // if the success criteria are not met.
<span class="lineNum">     443 </span><span class="lineNoCov">          0 : bool UnorderedElementsAreMatcherImplBase::</span>
<span class="lineNum">     444 </span>            : VerifyAllElementsAndMatchersAreMatched(
<span class="lineNum">     445 </span>            :     const ::std::vector&lt;string&gt;&amp; element_printouts,
<span class="lineNum">     446 </span>            :     const MatchMatrix&amp; matrix,
<span class="lineNum">     447 </span>            :     MatchResultListener* listener) const {
<span class="lineNum">     448 </span><span class="lineNoCov">          0 :   bool result = true;</span>
<span class="lineNum">     449 </span><span class="lineNoCov">          0 :   ::std::vector&lt;char&gt; element_matched(matrix.LhsSize(), 0);</span>
<span class="lineNum">     450 </span><span class="lineNoCov">          0 :   ::std::vector&lt;char&gt; matcher_matched(matrix.RhsSize(), 0);</span>
<span class="lineNum">     451 </span>            : 
<span class="lineNum">     452 </span><span class="lineNoCov">          0 :   for (size_t ilhs = 0; ilhs &lt; matrix.LhsSize(); ilhs++) {</span>
<span class="lineNum">     453 </span><span class="lineNoCov">          0 :     for (size_t irhs = 0; irhs &lt; matrix.RhsSize(); irhs++) {</span>
<span class="lineNum">     454 </span><span class="lineNoCov">          0 :       char matched = matrix.HasEdge(ilhs, irhs);</span>
<span class="lineNum">     455 </span><span class="lineNoCov">          0 :       element_matched[ilhs] |= matched;</span>
<span class="lineNum">     456 </span><span class="lineNoCov">          0 :       matcher_matched[irhs] |= matched;</span>
<span class="lineNum">     457 </span>            :     }
<span class="lineNum">     458 </span>            :   }
<span class="lineNum">     459 </span>            : 
<span class="lineNum">     460 </span>            :   {
<span class="lineNum">     461 </span>            :     const char* sep =
<span class="lineNum">     462 </span><span class="lineNoCov">          0 :         &quot;where the following matchers don't match any elements:\n&quot;;</span>
<span class="lineNum">     463 </span><span class="lineNoCov">          0 :     for (size_t mi = 0; mi &lt; matcher_matched.size(); ++mi) {</span>
<span class="lineNum">     464 </span><span class="lineNoCov">          0 :       if (matcher_matched[mi])</span>
<span class="lineNum">     465 </span><span class="lineNoCov">          0 :         continue;</span>
<span class="lineNum">     466 </span><span class="lineNoCov">          0 :       result = false;</span>
<span class="lineNum">     467 </span><span class="lineNoCov">          0 :       if (listener-&gt;IsInterested()) {</span>
<span class="lineNum">     468 </span><span class="lineNoCov">          0 :         *listener &lt;&lt; sep &lt;&lt; &quot;matcher #&quot; &lt;&lt; mi &lt;&lt; &quot;: &quot;;</span>
<span class="lineNum">     469 </span><span class="lineNoCov">          0 :         matcher_describers_[mi]-&gt;DescribeTo(listener-&gt;stream());</span>
<span class="lineNum">     470 </span><span class="lineNoCov">          0 :         sep = &quot;,\n&quot;;</span>
<span class="lineNum">     471 </span>            :       }
<span class="lineNum">     472 </span>            :     }
<span class="lineNum">     473 </span>            :   }
<span class="lineNum">     474 </span>            : 
<span class="lineNum">     475 </span>            :   {
<span class="lineNum">     476 </span>            :     const char* sep =
<span class="lineNum">     477 </span><span class="lineNoCov">          0 :         &quot;where the following elements don't match any matchers:\n&quot;;</span>
<span class="lineNum">     478 </span><span class="lineNoCov">          0 :     const char* outer_sep = &quot;&quot;;</span>
<span class="lineNum">     479 </span><span class="lineNoCov">          0 :     if (!result) {</span>
<span class="lineNum">     480 </span><span class="lineNoCov">          0 :       outer_sep = &quot;\nand &quot;;</span>
<span class="lineNum">     481 </span>            :     }
<span class="lineNum">     482 </span><span class="lineNoCov">          0 :     for (size_t ei = 0; ei &lt; element_matched.size(); ++ei) {</span>
<span class="lineNum">     483 </span><span class="lineNoCov">          0 :       if (element_matched[ei])</span>
<span class="lineNum">     484 </span><span class="lineNoCov">          0 :         continue;</span>
<span class="lineNum">     485 </span><span class="lineNoCov">          0 :       result = false;</span>
<span class="lineNum">     486 </span><span class="lineNoCov">          0 :       if (listener-&gt;IsInterested()) {</span>
<span class="lineNum">     487 </span><span class="lineNoCov">          0 :         *listener &lt;&lt; outer_sep &lt;&lt; sep &lt;&lt; &quot;element #&quot; &lt;&lt; ei &lt;&lt; &quot;: &quot;</span>
<span class="lineNum">     488 </span><span class="lineNoCov">          0 :                   &lt;&lt; element_printouts[ei];</span>
<span class="lineNum">     489 </span><span class="lineNoCov">          0 :         sep = &quot;,\n&quot;;</span>
<span class="lineNum">     490 </span><span class="lineNoCov">          0 :         outer_sep = &quot;&quot;;</span>
<span class="lineNum">     491 </span>            :       }
<span class="lineNum">     492 </span>            :     }
<span class="lineNum">     493 </span>            :   }
<span class="lineNum">     494 </span><span class="lineNoCov">          0 :   return result;</span>
<span class="lineNum">     495 </span>            : }
<span class="lineNum">     496 </span>            : 
<span class="lineNum">     497 </span>            : }  // namespace internal
<span class="lineNum">     498 </span>            : }  // namespace testing
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.11</a></td></tr>
  </table>
  <br>

</body>
</html>
